﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UltimatePlugin.Db.Cache;
using Zeta.Common;
using Zeta.Internals.Actors;

namespace UltimatePlugin.Db.SpellManagement
{
    internal class SpellOnPosition : Spell
    {
        private Vector3 _Position;

        public SpellOnPosition(SNOPower power, Vector3 position)
            : base(power)
        {
            _Position = position;
        }


        public override void Cast()
        {
            if (SpellManager.CanUse(Power))
            {
                SpellManager.Use(Power, _Position, EnvironmentCache.CurrentWorldID);
            }
        }
    }
}
